<!DOCTYPE html>
<html lang="en">

<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta charset="utf-8" />
	<title>北京西大校友产业生态圈联盟</title>

	<meta name="description" content="Common form elements and layouts" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

	<!-- bootstrap & fontawesome -->
	<link rel="stylesheet" href="/static/ace/assets/css/bootstrap.css" />
	<link rel="stylesheet" href="/static/ace/components/font-awesome/css/font-awesome.css" />
	<link rel="stylesheet" href="/static/ace/components/_mod/jquery-ui/jquery-ui.css" />

	<!-- page specific plugin styles -->
	<link rel="stylesheet" href="/static/ace/components/_mod/jquery-ui.custom/jquery-ui.custom.css" />
	<link rel="stylesheet" href="/static/ace/components/jquery.gritter/css/jquery.gritter.css" />

	<!-- text fonts -->
	<link rel="stylesheet" href="/static/ace/assets/css/ace-fonts.css" />

	<!-- ace styles -->
	<link rel="stylesheet" href="/static/ace/assets/css/ace.css" class="ace-main-stylesheet" id="main-ace-style" />

	<link rel="stylesheet" href="/static/ace/assets/css/ace-skins.css" />
	<link rel="stylesheet" href="/static/ace/components/_mod/x-editable/bootstrap-editable.css" />

	<script src="/static/ace/components/jquery/dist/jquery.js"></script>
	<script src="/static/js/jquery.cookie.js"></script>
	<!-- <![endif]-->
	<script type="text/javascript">
		console.log($.cookie('key'));
		if ($.cookie('key') == null) {
			console.log("jquery cookie");
			$(location).attr('href', '/user/login');
			// console.log("jquery cookie");
			// location.href("/user/login");
		}
	</script>
</head>

<body class="no-skin">
	<!-- #section:basics/navbar.layout -->
	<div id="navbar" class="navbar navbar-default          ace-save-state">
		<div class="navbar-container ace-save-state" id="navbar-container">
			<!-- #section:basics/sidebar.mobile.toggle -->
			<button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
				<span class="sr-only"></span>

				<span class="icon-bar"></span>

				<span class="icon-bar"></span>

				<span class="icon-bar"></span>
			</button>

			<!-- /section:basics/sidebar.mobile.toggle -->
			<div class="navbar-header pull-left">

			</div>

			<!-- #section:basics/navbar.dropdown -->
			<div class="navbar-buttons navbar-header pull-right" role="navigation">
				<ul class="nav ace-nav">

					<!-- #section:basics/navbar.user_menu -->
					<li class="light-blue dropdown-modal">
						<a data-toggle="dropdown" href="#" class="dropdown-toggle">
							<span class="user-info" style="margin-top:10px;">
								{{.UserInfo.name}}
							</span>
							<i class="ace-icon fa fa-caret-down"></i>
						</a>

						<ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">

							<li>
								<a href="javascript:logout()">
									<i class="ace-icon fa fa-power-off"></i>
									退出登录
								</a>
								<script>
									logout = () => {
										window.location.href = "/user/login"
									}
								</script>
							</li>
						</ul>
					</li>

					<!-- /section:basics/navbar.user_menu -->
				</ul>
			</div>

			<!-- /section:basics/navbar.dropdown -->
		</div>
		<!-- /.navbar-container -->
	</div>
	<div class="main-container ace-save-state" id="main-container">

		<!-- /section:basics/sidebar -->
		<div class="main-content">
			<div class="main-content-inner ">

				<div style="padding-left: 18%;padding-right: 18%;padding-top: 40px;">
					<img width="140px" src="/static/logo.jpg">
					<span class=" lighter blue" style="font-size: 36px;">
						&nbsp;&nbsp;&nbsp;&nbsp;北京西大校友产业生态圈联盟
					</span>
				</div>

				<div class="tabbable" style="padding-left: 18%;padding-right: 18%;padding-top: 20px;;padding-bottom: 20px;">
						<ul class="nav nav-tabs" id="myTab">
							<li class="active">
								<a data-toggle="tab" href="#home">
									信息填写
								</a>
							</li>

							<li>
								<a data-toggle="tab" href="#messages">
									密码修改
								</a>
							</li>
						</ul>

						<div class="tab-content">
							<div id="home" class="tab-pane fade in active">
									<div class="row" >
											<div class="col-xs-12">
												<!-- PAGE CONTENT BEGINS -->
												<form class="form-horizontal" role="form">
													<h3 class="header smaller lighter blue">
														基本信息
						
													</h3>
													<div class="col-xs-12 " style="padding-left: 0px;padding-right: 0px;">
														<div class="col-xs-10" style="padding-left: 0px;padding-right: 0px;">
															<div class="form-group">
																<label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 姓名: </label>
																<div class="col-sm-4">
																	<input value="{{.UserInfo.name}}" id="name" type="text" id="form-field-1" placeholder="请输入姓名" class="col-xs-12 col-sm-12"
																	/>
																</div>
																<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 性别: </label>
																<script>
																		jQuery(function ($) {
																			$("input[name='sex'][value='{{.UserInfo.sex}}']").prop('checked', true);
																		});
																	</script>
																<div class="col-sm-4">
																	<div class="radio col-sm-3">
																		<label>
																			<input type="radio" name="sex" id="optionsRadios1" value="男" checked> 男
																		</label>
																	</div>
																	<div class="radio col-sm-3">
																		<label>
																			<input type="radio" name="sex" id="optionsRadios2" value="女"> 女
																		</label>
																	</div>
																	<!-- <input id="sex" type="text" id="form-field-1" placeholder="请输入性别" class="col-xs-12 col-sm-12" /> -->
																</div>
						
															</div>
						
															<div class="form-group">
																<label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 民族: </label>
																<div class="col-sm-4">
																	<!-- <input value="{{.UserInfo.nation}}" id="nation" type="text" id="form-field-1" placeholder="请输入民族" class="col-xs-12 col-sm-12" /> -->
																	<select id="nation" value="{{.UserInfo.nation}}" class="selectpicker show-tick form-control" data-live-search="false">
																		<option value="汉族">汉族</option>
																		<option value="壮族">壮族</option>
																		<option value="满族">满族</option>
																		<option value="回族">回族</option>
																		<option value="苗族">苗族</option>
																		<option value="维吾尔族">维吾尔族</option>
																		<option value="土家族">土家族</option>
																		<option value="彝族">彝族</option>
																		<option value="蒙古族">蒙古族</option>
																		<option value="藏族">藏族</option>
																		<option value="布依族">布依族</option>
																		<option value="侗族">侗族</option>
																		<option value="瑶族">瑶族</option>
																		<option value="朝鲜族">朝鲜族</option>
																		<option value="白族">白族</option>
																		<option value="哈尼族">哈尼族</option>
																		<option value="哈萨克族">哈萨克族</option>
																		<option value="黎族">黎族</option>
																		<option value="傣族">傣族</option>
																		<option value="畲族">畲族</option>
																		<option value="傈僳族">傈僳族</option>
																		<option value="仡佬族">仡佬族</option>
																		<option value="东乡族">东乡族</option>
																		<option value="高山族">高山族</option>
																		<option value="拉祜族">拉祜族</option>
																		<option value="水族">水族</option>
																		<option value="佤族">佤族</option>
																		<option value="纳西族">纳西族</option>
																		<option value="羌族">羌族</option>
																		<option value="土族">土族</option>
																		<option value="仫佬族">仫佬族</option>
																		<option value="锡伯族">锡伯族</option>
																		<option value="柯尔克孜族">柯尔克孜族</option>
																		<option value="达斡尔族">达斡尔族</option>
																		<option value="景颇族">景颇族</option>
																		<option value="毛南族">毛南族</option>
																		<option value="撒拉族">撒拉族</option>
																		<option value="布朗族">布朗族</option>
																		<option value="塔吉克族">塔吉克族</option>
																		<option value="阿昌族">阿昌族</option>
																		<option value="普米族">普米族</option>
																		<option value="鄂温克族">鄂温克族</option>
																		<option value="怒族">怒族</option>
																		<option value="京族">京族</option>
																		<option value="基诺族">基诺族</option>
																		<option value="德昂族">德昂族</option>
																		<option value="保安族">保安族</option>
																		<option value="俄罗斯族">俄罗斯族</option>
																		<option value="裕固族">裕固族</option>
																		<option value="乌孜别克族">乌孜别克族</option>
																		<option value="门巴族">门巴族</option>
																		<option value="鄂伦春族">鄂伦春族</option>
																		<option value="独龙族">独龙族</option>
																		<option value="塔塔尔族">塔塔尔族</option>
																		<option value="赫哲族">赫哲族</option>
																		<option value="珞巴族">珞巴族</option>
																	</select>
																</div>
																<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 籍贯: </label>
																<div class="col-sm-4">
																	<input value="{{.UserInfo.originaddress}}" id="originaddress" type="text" id="form-field-1" placeholder="请输入籍贯" class="col-xs-12 col-sm-12"
																	/>
																</div>
															</div>
						
															<div class="form-group">
																<label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 出生地: </label>
																<div class="col-sm-4">
																	<input value="{{.UserInfo.birthaddress}}" id="birthaddress" type="text" id="form-field-1" placeholder="请输入出生地" class="col-xs-12 col-sm-12"
																	/>
																</div>
																<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 出生年月: </label>
																<div class="col-sm-4">
																	<div class="input-group">
																		<input class="form-control date-picker " value="{{.UserInfo.birthdate}}" id="birthdate" type="text" data-date-format="yyyy-mm-dd" />
																		<span class="input-group-addon">
																			<i class="fa fa-calendar bigger-110"></i>
																		</span>
																	</div>
																</div>
															</div>
															<div class="form-group">
																<label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 手机: </label>
																<div class="col-sm-4">
																	<input value="{{.UserInfo.mobile}}" id="mobile" type="text" id="form-field-1" placeholder="请输入手机" class="col-xs-12 col-sm-12"
																	/>
																</div>
																<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 电子邮箱: </label>
																<div class="col-sm-4">
																	<input value="{{.UserInfo.email}}" id="email" type="text" id="form-field-1" placeholder="请输入电子邮箱" class="col-xs-12 col-sm-12" />
																</div>
															</div>
															<div class="form-group">
																<label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 职称: </label>
																<div class="col-sm-4">
																	<input value="{{.UserInfo.professionaltitle}}" id="professionaltitle" type="text" id="form-field-1" placeholder="请输入职称" class="col-xs-12 col-sm-12"
																	/>
																</div>
															</div>
														</div>
														<div class="col-xs-2" style="margin-top:20px;">
															<span class="profile-picture">
																<img id="avatar" class="editable img-responsive" style="width:95px;height:142px;" alt="头像" src="/static/ace/assets/avatars/profile.jpg" />
															</span>
															<!-- <div  class="pull-left alert alert-success no-margin alert-dismissable">
																<button type="button" class="close" data-dismiss="alert">
																	<i class="ace-icon fa fa-times"></i>
																</button>
																<i class="ace-icon fa fa-umbrella bigger-120 blue"></i>
																点击图片修改头像
															</div> -->
														</div>
													</div>
						
						
													<h3 class="header smaller lighter blue">
														教育经历
														<span class="pull-right" style="font-weight: bold;font-size: 30px;cursor: pointer;" onclick="addeducation()">+</span>
													</h3>
													<script>
														// alert("{{.EducationAll}}");
														var educount = 2;
														addeducation = () => {
															var eduid = educount++;
															
															var template = '<div  class="col-xs-12 col-sm-12" style="margin-bottom: 20px">' +
																'<span class="col-xs-3 col-sm-3" >' +
																'<div class="input-daterange input-group">' +
																'	<input id="edustart_' + eduid +
																'"  type="text" class="input-sm form-control date-picker"  data-date-format="yyyy-mm-dd"/>' +
																'<span class="input-group-addon">' +
																'-' +
																// '	<i class="fa fa-exchange"></i>' +
																'	</span>' +
																'	<input type="text" id="eduend_' + eduid +
																'" class="input-sm form-control date-picker"  data-date-format="yyyy-mm-dd"/>' +
																'</div>' +
																'</span>' +
																'<span class="col-xs-3 col-sm-3 center"><input id="educollege_' + eduid +
																'" class="col-xs-12" type="text"  />' +
																'</span>' +
																'<span class="col-xs-3 col-sm-3 center"><input id="edumajor_' + eduid +
																'" class="col-xs-12" type="text"  />' +
																'</span>' +
																'<span class="col-xs-2 col-sm-2 center"><input id="edudegree_' + eduid + '" type="text" />' +
																'</span>' +
																'<span class="col-xs-1 col-sm-1 pull-right">'+
																'<i class="glyphicon glyphicon-minus" style="margin-top:8px;font-weight: bold;font-size: 15px;cursor: pointer;" onclick="deletenode(this)"></i>'+
															'</span>'+
															'</div>';
															$("#educationcontainer").append(template);
															$('.date-picker').attr("onfocus", "this.blur();");
															$('.date-picker').datepicker({
																language: 'zh-CN',
																autoclose: true,
																todayHighlight: true
															});
						
															$('.input-daterange').datepicker({
																autoclose: true
															});
														}
														deletenode = (e) => {
															e.parentNode.parentNode.remove()
														}
													</script>
													<div id="educationcontainer" class="col-xs-12 col-sm-12" style="margin-bottom: 30px;padding-left: 0px;padding-right: 0px;">
														<div class="col-xs-12 col-sm-12" style="margin-bottom: 20px">
															<span class="col-xs-3 col-sm-3 center">时间</span>
															<span class="col-xs-3 col-sm-3 center">学校院系</span>
															<span class="col-xs-3 col-sm-3 center">专业</span>
															<span class="col-xs-3 col-sm-2 center">学历</span>
															<span class="col-xs-1 col-sm-1 center"></span>
														</div>
														
														{{range .EducationAll}}
														<div class="col-xs-12 col-sm-12" style="margin-bottom: 20px">
															<span class="col-xs-3 col-sm-3">
																<div class="input-daterange input-group">
																	<input type="text" value="{{.EduStart}}" class="input-sm form-control date-picker" id="edustart_1" language="zh-CN" data-date-format="yyyy-mm-dd" />
																	<span class="input-group-addon">
																		-
																		<!-- <i class="fa fa-exchange"></i> -->
																	</span>
																	<input type="text" value="{{.EduEnd}}" class="input-sm form-control date-picker" id="eduend_1" data-date-format="yyyy-mm-dd" />
																</div>
															</span>
															<span class="col-xs-3 col-sm-3 center">
																<input class="col-xs-12" value="{{.EduCollege}}" id="educollege_1" type="text" />
															</span>
															<span class="col-xs-3 col-sm-3 center">
																<input class="col-xs-12" value="{{.EduMajor}}" id="edumajor_1" type="text" />
															</span>
															<span class="col-xs-2 col-sm-2 center">
																	<input class="col-xs-12" value="{{.EduMajor}}" id="edumajor_1" type="text" />
															</span>
															<span class="col-xs-1 col-sm-1 pull-right">
																<i class="glyphicon glyphicon-minus" style="margin-top:8px;font-weight: bold;font-size: 15px;cursor: pointer;" onclick="deletenode(this)"></i>
															</span>
														</div>
														{{else}}
														<div class="col-xs-12 col-sm-12" style="margin-bottom: 20px">
																<span class="col-xs-3 col-sm-3">
																	<div class="input-daterange input-group">
																		<input type="text" value="" class="input-sm form-control date-picker" id="edustart_1" language="zh-CN" data-date-format="yyyy-mm-dd"
																		/>
																		<span class="input-group-addon">
																			-
																			<!-- <i class="fa fa-exchange"></i> -->
																		</span>
																		<input type="text" value="" class="input-sm form-control date-picker" id="eduend_1" data-date-format="yyyy-mm-dd" />
																	</div>
																</span>
																<span class="col-xs-3 col-sm-3 center">
																	<input class="col-xs-12" value="" id="educollege_1" type="text" />
																</span>
																<span class="col-xs-3 col-sm-3 center">
																	<input class="col-xs-12" value="" id="edumajor_1" type="text" />
																</span>
																<span class="col-xs-2 col-sm-2 ">
																	<input id="edudegree_1" value="" type="text" />
																</span>
																<span class="col-xs-1 col-sm-1 pull-right">
																		<i class="glyphicon glyphicon-minus" style="margin-top:8px;font-weight: bold;font-size: 15px;cursor: pointer;" onclick="deletenode(this)"></i>
																</span>
							
															</div>
														{{end}}
						
													</div>
						
													<h3 class="header smaller lighter blue">
														工作经历
														<span class="pull-right" style="font-weight: bold;font-size: 30px;cursor: pointer;" onclick="addworkexperiencecontainer()">+</span>
													</h3>
													<script>
															var workcount = 2;
															
														addworkexperiencecontainer = () => {
															var workid = workcount++;
															var template = '<div  class="col-xs-12 col-sm-12" style="margin-bottom: 20px">' +
																'<span class="col-xs-3 col-sm-3" >' +
																'<div class="input-daterange input-group">' +
																'	<input id="workstart_'+workid+'" type="text" class="input-sm form-control date-picker"  data-date-format="yyyy-mm-dd"/>' +
																'<span class="input-group-addon">' +
																'-' +
																// '	<i class="fa fa-exchange"></i>' +
																'	</span>' +
																'	<input id="workend_'+workid+'" type="text" class="input-sm form-control date-picker" data-date-format="yyyy-mm-dd"/>' +
																'</div>' +
																'</span>' +
																'<span class="col-xs-3 col-sm-3 center"><input id="workcompany_'+workid+'" class="col-xs-12" type="text"  />' +
																'</span>' +
																'<span class="col-xs-3 col-sm-3 center"><input id="workduty_'+workid+'" class="col-xs-12" type="text"  />' +
																'</span>' +
																'<span class="col-xs-2 col-sm-2 center"><input id="worktime_'+workid+'" type="text" />' +
																'</span>' +
																'<span class="col-xs-1 col-sm-1 pull-right">'+
																'<i class="glyphicon glyphicon-minus" style="margin-top:8px;font-weight: bold;font-size: 15px;cursor: pointer;" onclick="deletenode(this)"></i>'+
															'</span>'+
															'</div>';
															$("#workexperiencecontainer").append(template);
															// 时间选择框失去光标
															$('.date-picker').attr("onfocus", "this.blur();");
															$('.date-picker').datepicker({
																language: 'zh-CN',
																autoclose: true,
																todayHighlight: true
															});
						
															$('.input-daterange').datepicker({
																autoclose: true
															});
														}
													</script>
													<div id="workexperiencecontainer" class="col-xs-12 col-sm-12" style="margin-bottom: 30px;padding-left: 0px;padding-right: 0px;">
														<div class="col-xs-12 col-sm-12" style="margin-bottom: 20px">
															<span class="col-xs-3 col-sm-3 center">时间</span>
															<span class="col-xs-3 col-sm-3 center">单位名称</span>
															<span class="col-xs-3 col-sm-3 center">职务</span>
															<span class="col-xs-2 col-sm-2 center">全职/兼职</span>
															<span class="col-xs-1 col-sm-1 center"></span>
														</div>
														{{range .WorkAll}}
														<div class="col-xs-12 col-sm-12" style="margin-bottom: 20px">
															<span class="col-xs-3 col-sm-3">
																<div class="input-daterange input-group">
																	<input type="text" value="{{.WorkStart}}" class="input-sm form-control date-picker" id="workstart_1" language="zh-CN" data-date-format="yyyy-mm-dd" />
																	<span class="input-group-addon">
																		-
																		<!-- <i class="fa fa-exchange"></i> -->
																	</span>
						
																	<input type="text" value="{{.WorkEnd}}" class="input-sm form-control date-picker" id="workend_1" data-date-format="yyyy-mm-dd"
																	/>
																</div>
															</span>
															<span class="col-xs-3 col-sm-3 center">
																<input class="col-xs-12" id="workcompany_1" value="{{.WorkCompany}}" type="text" />
															</span>
															<span class="col-xs-3 col-sm-3 center">
																<input class="col-xs-12" id="workduty_1" value="{{.WorkDuty}}" type="text" />
															</span>
															<span class="col-xs-2 col-sm-2 ">
																<input id="worktime_1" value="{{.WorkTime}}" type="text" />
															</span>
															<span class="col-xs-1 col-sm-1 pull-right">
																	<i class="glyphicon glyphicon-minus" style="margin-top:8px;font-weight: bold;font-size: 15px;cursor: pointer;" onclick="deletenode(this)"></i>
															</span>
														</div>
														{{else}}
														<div class="col-xs-12 col-sm-12" style="margin-bottom: 20px">
																<span class="col-xs-3 col-sm-3">
																	<div class="input-daterange input-group">
																		<input type="text" value="{{.WorkStart}}" class="input-sm form-control date-picker" id="workstart_1" language="zh-CN" data-date-format="yyyy-mm-dd"
																		/>
																		<span class="input-group-addon">
																			-
																			<!-- <i class="fa fa-exchange"></i> -->
																		</span>
							
																		<input type="text" value="{{.WorkEnd}}" class="input-sm form-control date-picker" id="workend_1" data-date-format="yyyy-mm-dd"
																		/>
																	</div>
																</span>
																<span class="col-xs-3 col-sm-3 center">
																	<input class="col-xs-12" id="workcompany_1" value="{{.WorkCompany}}" type="text" />
																</span>
																<span class="col-xs-3 col-sm-3 center">
																	<input class="col-xs-12" id="workduty_1" value="{{.WorkDuty}}" type="text" />
																</span>
																<span class="col-xs-2 col-sm-2 ">
																	<input id="worktime_1" value="{{.WorkTime}}" type="text" />
																</span>
																<span class="col-xs-1 col-sm-1 pull-right">
																		<i class="glyphicon glyphicon-minus" style="margin-top:8px;font-weight: bold;font-size: 15px;cursor: pointer;" onclick="deletenode(this)"></i>
																</span>
															</div>
													{{end}}
													</div>
													<h3 class="header smaller lighter blue">
														主要业绩、荣誉
						
													</h3>
													<div class="col-xs-12 col-sm-12" style="padding-left: 0px;padding-right: 0px;margin-bottom: 30px;">
														<div class="clearfix">
															<textarea value="{{.UserInfo.honor}}" id="honor" placeholder="请输入主要业绩、荣誉" style="width:100%;height:150px;" class="input-xlarge"></textarea>
														</div>
													</div>
													<h3 class="header smaller lighter blue">
														现工作单位及年限
						
													</h3>
													<div class="form-group" style="margin-bottom:30px;">
														<label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 现工作单位: </label>
														<div class="col-sm-4">
															<input value="{{.UserInfo.company}}" id="company" type="text" id="form-field-1" placeholder="请输入现工作单位" class="col-xs-12 col-sm-12"
															/>
														</div>
														<label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 年限: </label>
														<div class="col-sm-4">
															<input value="{{.UserInfo.companyyear}}" id="companyyear" type="text" id="form-field-1" placeholder="请输入工作年限" class="col-xs-12 col-sm-12"
															/>
														</div>
						
													</div>
													<h3 class="header smaller lighter blue">
														单位性质
						
													</h3>
													<script>
														jQuery(function ($) {
															$("input[name='companynature'][value='{{.UserInfo.companynature}}']").prop('checked', true);
														});
													</script>
													<div class="form-group" style="margin-bottom:30px;">
														<div class="checkbox col-sm-4">
															<label>
																<input type="radio" name="companynature" value="国家行政机关" checked="true"> 国家行政机关
															</label>
														</div>
														<div class="checkbox col-sm-4">
															<label>
																<input type="radio" name="companynature" value="公私合作企业"> 公私合作企业
															</label>
														</div>
														<div class="checkbox col-sm-4">
															<label>
																<input type="radio" name="companynature" value="中外合资企业"> 中外合资企业
															</label>
														</div>
														<div class="checkbox col-sm-4">
															<label>
																<input type="radio" name="companynature" value="社会组织机构"> 社会组织机构
															</label>
														</div>
														<div class="checkbox col-sm-4">
															<label>
																<input type="radio" name="companynature" value="国际组织机构"> 国际组织机构
															</label>
														</div>
														<div class="checkbox col-sm-4">
															<label>
																<input type="radio" name="companynature" value="外资企业"> 外资企业
															</label>
														</div>
														<div class="checkbox col-sm-4">
															<label>
																<input type="radio" name="companynature" value="私营企业"> 私营企业
															</label>
														</div>
														<div class="checkbox col-sm-4">
															<label>
																<input type="radio" name="companynature" value="集体企业"> 集体企业
															</label>
														</div>
														<div class="checkbox col-sm-4">
															<label>
																<input type="radio" name="companynature" value="国防军事企业"> 国防军事企业
															</label>
														</div>
						
													</div>
						
													<h3 class="header smaller lighter blue">
														行业领域
						
													</h3>
													<script>
														jQuery(function ($) {
						
															var servicesArray = "{{.UserInfo.industry}}".split(",");
															$("input[type=checkbox][name=industry]").each(function (i, e) {
																for (var i = 0; i < servicesArray.length; i++) {
																	// alert($(this).val() == servicesArray[i]);
																	if ($(this).val() == servicesArray[i]) {
																		$(this).attr("checked", true);
																	}
																}
															});
														});
													</script>
													<div class="form-group" style="margin-bottom:30px;">
						
														<div class="checkbox col-sm-12">
															<label>
																<input name="industry" type="checkbox" class="ace" value="金融/教育/企业服务：证券 投资 保险 银行 职业技能 语言培训 课外辅导 兴趣培训 早教 法律 财税 商标专利 招聘">
																<span class="lbl"> 金融/教育/企业服务：证券 投资 保险 银行 职业技能 语言培训 课外辅导 兴趣培训 早教 法律 财税 商标专利 招聘</span>
															</label>
														</div>
														<div class="checkbox col-sm-12">
															<label>
																<input name="industry" type="checkbox" class="ace" value="机械/电子/汽车/五金：汽车相关 工程自动化 模具铸造 机床动力 工具设备 专用机械 五金配件 电子元件">
																<span class="lbl"> 机械/电子/汽车/五金：汽车相关 工程自动化 模具铸造 机床动力 工具设备 专用机械 五金配件 电子元件 </span>
															</label>
														</div>
														<div class="checkbox col-sm-12">
															<label>
																<input name="industry" type="checkbox" class="ace" value="食品/烟酒/医药/美容：食品 烟酒 饮料 医药 医疗服务 医疗器械 整形美容 生物技术">
																<span class="lbl"> 食品/烟酒/医药/美容：食品 烟酒 饮料 医药 医疗服务 医疗器械 整形美容 生物技术 </span>
															</label>
														</div>
														<div class="checkbox col-sm-12">
															<label>
																<input name="industry" type="checkbox" class="ace" value="石化/冶金/能源/环保：新能源 电力煤炭 石油 天然气 矿产 环保 橡胶塑料 涂料 化学原料 化学产品">
																<span class="lbl"> 石化/冶金/能源/环保：新能源 电力煤炭 石油 天然气 矿产 环保 橡胶塑料 涂料 化学原料 化学产品</span>
															</label>
														</div>
														<div class="checkbox col-sm-12">
															<label>
																<input name="industry" type="checkbox" class="ace" value="房产/建筑/餐饮/旅游/招商：房地产 建材 装饰装修 物业中介 品牌招商 旅游 酒店 餐饮 休闲">
																<span class="lbl"> 房产/建筑/餐饮/旅游/招商：房地产 建材 装饰装修 物业中介 品牌招商 旅游 酒店 餐饮 休闲 </span>
															</label>
														</div>
														<div class="checkbox col-sm-12">
															<label>
																<input name="industry" type="checkbox" class="ace" value="粮食/畜牧/养殖/花卉/苗木：苗木花卉 粮食种业 猪牛羊 家禽 水产 饲料 农药化肥">
																<span class="lbl"> 粮食/畜牧/养殖/花卉/苗木：苗木花卉 粮食种业 猪牛羊 家禽 水产 饲料 农药化肥
																</span>
															</label>
														</div>
														<div class="checkbox col-sm-12">
															<label>
																<input name="industry" type="checkbox" class="ace" value="IT/互联网/广告/文化/传媒/演艺：互联网 游戏 硬件 软件 创意设计 广告传媒 影视动漫 美术工艺">
																<span class="lbl"> IT/互联网/广告/文化/传媒/演艺：互联网 游戏 硬件 软件 创意设计 广告传媒 影视动漫 美术工艺 </span>
															</label>
														</div>
														<div class="checkbox col-sm-12">
															<label>
																<input name="industry" type="checkbox" class="ace" value="家居/纺织/消防/运输：家具 日杂 化妆品 服装 鞋帽箱包 纺织原料 物流运输 安防 消防 包装 印刷 工艺品 纸张">
																<span class="lbl"> 家居/纺织/消防/运输：家具 日杂 化妆品 服装 鞋帽箱包 纺织原料 物流运输 安防 消防 包装 印刷 工艺品 纸张
																</span>
															</label>
														</div>
														<div class="checkbox col-sm-12">
															<label>
																<input name="industry" type="checkbox" class="ace" value="协会/组织/校友/战友/兴趣/联盟：职业联盟 校友 战友 同乡 兴趣 运动 公共事业 综合">
																<span class="lbl"> 协会/组织/校友/战友/兴趣/联盟：职业联盟 校友 战友 同乡 兴趣 运动 公共事业 综合 </span>
															</label>
														</div>
														<div class="checkbox col-sm-12">
															<label>
																<input name="industry" type="checkbox" class="ace" value="其他行业：体育 手机 通讯 家电">
																<span class="lbl"> 其他行业：体育 手机 通讯 家电
																</span>
															</label>
														</div>
						
						
													</div>
													<h3 class="header smaller lighter blue">
														所属单位对行业领域的贡献
						
													</h3>
													<div class="col-xs-12 col-sm-12" style="padding-left: 0px;padding-right: 0px;margin-bottom: 30px;">
														<div class="clearfix">
															<textarea value="{{.UserInfo.companycontribution}}" id="companycontribution" placeholder="请输入所属单位对行业领域的贡献" style="width:100%;height:150px;"
																class="input-xlarge"></textarea>
														</div>
													</div>
													<h3 class="header smaller lighter blue">
														资源、优势及平台情况
						
													</h3>
													<div class="col-xs-12 col-sm-12" style="padding-left: 0px;padding-right: 0px;margin-bottom: 30px;">
														<div class="clearfix">
															<textarea value="{{.UserInfo.advantage}}" id="advantage" placeholder="请输入资源、优势及平台情况" style="width:100%;height:150px;" class="input-xlarge"></textarea>
														</div>
													</div>
													<h3 class="header smaller lighter blue">
														合作需求
						
													</h3>
													<div class="col-xs-12 col-sm-12" style="padding-left: 0px;padding-right: 0px;margin-bottom: 30px;">
														<div class="clearfix">
															<textarea value="{{.UserInfo.requirement}}" id="requirement" placeholder="请输入合作需求" style="width:100%;height:150px;" class="input-xlarge"></textarea>
														</div>
													</div>
													<h3 class="header smaller lighter blue" style="margin-top:40px;">
														愿意提供背书的产品、技术、项目、资本等
													</h3>
													<div class="col-xs-12 col-sm-12" style="padding-left: 0px;padding-right: 0px;margin-bottom: 30px;">
														<div class="clearfix">
															<textarea value="{{.UserInfo.supply}}" id="supply" placeholder="请输入愿意提供背书的产品、技术、项目、资本等" style="width:100%;height:150px;"
																class="input-xlarge"></textarea>
														</div>
													</div>
													<div class="hr hr-24"></div>
													<div class="col-md-offset-5 col-md-4" style="padding-bottom: 40px;">
														<button onClick="deleteuser()" class="btn" type="button">
															<i class="ace-icon fa fa-undo bigger-110"></i>
															注销
														</button>
														<div id="dialog-message" class="hide">
															<p>
																删除后用户将被注销是否确认删除？
															</p>
														</div>
														<!-- #dialog-message -->
														&nbsp; &nbsp; &nbsp;
														<button onClick="submitData()" id="submit" class="btn btn-info" type="button">
															<i class="ace-icon fa fa-check bigger-110"></i>
															提交
														</button>
													</div>
						
												</form>
						
												<!-- PAGE CONTENT ENDS -->
											</div>
											<!-- /.col -->
										</div>
							</div>

							<div id="messages" class="tab-pane fade">
									<div class="row" >
											<div class="col-xs-12">
												<!-- PAGE CONTENT BEGINS -->
												<form class="form-horizontal center" role="form">
													
													<div class="col-xs-12 " style="padding-left: 0px;padding-right: 0px;">
														<div class="col-xs-10" style="padding-left: 0px;padding-right: 0px;">
															<div class="form-group">
																<label style="margin-left: 20px;" class="col-sm-5 control-label no-padding-right" for="form-field-1"> 原密码: </label>
																<div class="col-sm-4">
																	<input  id="oldpassword" type="text" id="form-field-1" placeholder="请输入原密码" class="col-xs-12 col-sm-12"
																	/>
																</div>
															</div>
														</div>
														<div class="col-xs-10" style="padding-left: 0px;padding-right: 0px;">
																<div class="form-group">
																	<label style="margin-left: 20px;" class="col-sm-5 control-label no-padding-right" for="form-field-1"> 新密码: </label>
																	<div class="col-sm-4">
																		<input  id="newpassword" type="text" id="form-field-1" placeholder="请输入新密码" class="col-xs-12 col-sm-12"
																		/>
																	</div>
																</div>
															</div>
															<div class="col-xs-10" style="padding-left: 0px;padding-right: 0px;">
																	<div class="form-group">
																		<label style="margin-left: 20px;" class="col-sm-5 control-label no-padding-right" for="form-field-1"> 确认新密码: </label>
																		<div class="col-sm-4">
																			<input  id="newpassword" type="text" id="form-field-1" placeholder="请确认新密码" class="col-xs-12 col-sm-12"
																			/>
																		</div>
																	</div>
																</div>
													</div>
						
										
													<div class="hr hr-24"></div>
													<div class="col-md-offset-4 col-md-4" style="padding-bottom: 40px;">
														
														<button onClick="submitData()" id="submit" class="btn btn-info" type="button">
															<i class="ace-icon fa fa-check bigger-110"></i>
															提交
														</button>
													</div>
						
												</form>
						
												<!-- PAGE CONTENT ENDS -->
											</div>
											<!-- /.col -->
										</div>
							</div>
						</div>
					</div>



				<!-- /.row -->

				<!-- /.page-content -->
			</div>
		</div>
		<!-- /.main-content -->

	</div>
	<!-- /.main-container -->

	<!-- basic scripts -->



	<!-- <![endif]-->
	<script src="/static/ace/assets/js/src/ace.js"></script>
	<!-- <script src="/static/assets/js/src/ace.basics.js"></script> -->
	<script src="/static/ace/components/bootstrap/dist/js/bootstrap.js"></script>
	<script src="/static/ace/components/jquery-ui/jquery-ui.js"></script>
	<script src="/static/ace/components/bootstrap-datepicker/dist/js/bootstrap-datepicker.js"></script>
	<script src="/static/ace/components/bootstrap-datepicker/js/locales/bootstrap-datepicker.zh-CN.js"></script>
	<script src="/static/ace/components/bootbox.js/bootbox.js"></script>
	<script src="/static/ace/components/_mod/x-editable/bootstrap-editable.js"></script>
	<script src="/static/ace/components/_mod/x-editable/ace-editable.js"></script>
	<script src="/static/ace/assets/js/src/elements.fileinput.js"></script>

	<script type="text/javascript">
		console.log("{{.UserInfo.avatar}}");
		$('#supply').val("{{.UserInfo.supply}}");
		$('#requirement').val("{{.UserInfo.requirement}}");
		$('#advantage').val("{{.UserInfo.advantage}}");
		$('#companycontribution').val("{{.UserInfo.companycontribution}}");
		$('#honor').val("{{.UserInfo.honor}}");
		$('#workexperience').val("{{.UserInfo.workexperience}}");
		$('#education').val("{{.UserInfo.education}}");
		if ("{{.UserInfo.avatar}}" != "") {
			$('#avatar').attr("src", "{{.UserInfo.avatar}}")
		}
		$('#avatar').attr("src", "{{.UserInfo.avatar}}");
		$('.date-picker').attr("onfocus", "this.blur();");
		$('.date-picker').datepicker({
			language: 'zh-CN',
			autoclose: true,
			todayHighlight: true
		});
		//show datepicker when clicking on the icon
		// .next().on(ace.click_event, function () {
		// 	$(this).prev().focus();
		// });

		$('.input-daterange').datepicker({
			autoclose: true
		});


		deleteuser = () => {
			var dialog = $("#dialog-message").removeClass('hide').dialog({
				modal: true,
				title: " 删除用户确认",
				title_html: true,
				buttons: [{
						text: "取消",
						"class": "btn btn-minier",
						click: function () {
							$(this).dialog("close");
						}
					},
					{
						text: "确认",
						"class": "btn btn-primary btn-minier",
						click: function () {
							$.ajax({
								type: "DELETE",
								url: '/api/user/{{.UserInfo.id}}',
								success: function () {
									console.log("delete successfully!");
								}
							});
							$(this).dialog("close");
						}
					}
				]
			});
		}
		submitData = () => {
			// alert($('#avatar').attr("src"));
			var industryObj = $("input[name='industry']")
			var insustrySelected = [];
			for (i in industryObj) {
				if (industryObj[i].checked)
					insustrySelected.push(industryObj[i].value);
			}

			if ($('#name').val() == "") {
				alert("姓名不能为空");
				return;
			}
			if ($('#mobile').val() == "") {
				alert("手机不能为空");
				return;
			}
			if ($('#originaddress').val() == "") {
				alert("籍贯不能为空");
				return;
			}
			if ($('#birthaddress').val() == "") {
				alert("出生地不能为空");
				return;
			}
			if ($('#birthdate').val() == "") {
				alert("出生日期不能为空");
				return;
			}

			if ($('#email').val() == "") {
				alert("邮箱不能为空");
				return;
			}
			if ($('#professionaltitle').val() == "") {
				alert("职称不能为空");
				return;
			}
			if ($('#honor').val() == "") {
				alert("主要业绩不能为空");
				return;
			}
			if ($('#company').val() == "") {
				alert("公司不能为空");
				return;
			}
			if ($('#companyyear').val() == "") {
				alert("工作年限不能为空");
				return;
			}
			if ($('#companycontribution').val() == "") {
				alert("行业贡献不能为空");
				return;
			}
			if ($('#advantage').val() == "") {
				alert("企业优势不能为空");
				return;
			}
			if ($('#requirement').val() == "") {
				alert("合作需求不能为空");
				return;
			}
			if ($('#supply').val() == "") {
				alert("愿意提供背书的产品、技术、项目、资本等不能为空");
				return;
			}

			var educationArry = [];
			// console.log($("input[id^='edustart_']").length);
			for (var i = 0; i < $("input[id^='edustart_']").length; i++) {
				educationArry.push({edustart:$($("input[id^='edustart_']")[i]).val(),
				eduend:$($("input[id^='eduend_']")[i]).val(),
				educollege:$($("input[id^='educollege_']")[i]).val(),
				edumajor:$($("input[id^='edumajor_']")[i]).val(),
				edudegree:$($("input[id^='edudegree_']")[i]).val()});
			}

			var workexperienceArry = [];
			for (var i = 0; i < $("input[id^='workstart_']").length; i++) {
				workexperienceArry.push({workstart:$($("input[id^='workstart_']")[i]).val(),
				workend:$($("input[id^='workend_']")[i]).val(),
				workcompany:$($("input[id^='workcompany_']")[i]).val(),
				workduty:$($("input[id^='workduty_']")[i]).val(),
				worktime:$($("input[id^='worktime_']")[i]).val()});
			}

			var payload = {
				avatar: $('#avatar').attr("src"),
				name: $('#name').val(),
				mobile: $('#mobile').val(),
				sex: $("input[name='sex']:checked").val(),
				nation: $('#nation').val(),
				originaddress: $('#originaddress').val(),
				birthaddress: $('#birthaddress').val(),
				birthdate: $('#birthdate').val(),
				email: $('#email').val(),
				professionaltitle: $('#professionaltitle').val(),
				education: educationArry,
				workexperience: workexperienceArry,
				honor: $('#honor').val(),
				company: $('#company').val(),
				companyyear: $('#companyyear').val(),
				companynature: $("input[name='companynature']:checked").val(),
				industry: insustrySelected.toString(),
				companycontribution: $('#companycontribution').val(),
				advantage: $('#advantage').val(),
				requirement: $('#requirement').val(),
				supply: $('#supply').val()
			};
			var opts = {
				method: 'PUT',
				body: JSON.stringify(payload),
				headers: {
					'Content-Type': 'application/json'
				}
			};
			console.log(JSON.stringify(payload));
			let url = '/api/user/{{.UserInfo.id}}';
			fetch(url, opts)
				.then( function (res) {
					if (res.ok) {
						bootbox.dialog({
						message: "修改成功!", 
						buttons: {
							"success" : {
								"label" : "确定",
								"className" : "btn-sm btn-primary"
							}
						}
						});
						console.log(res);
					} else if (res.status === 500) {

					} else if (res.status === 406) {

					}
				},
				function (e) {}
			)
			.catch(error => {});
		}

		// *** editable avatar *** //
		try { //ie8 throws some harmless exceptions, so let's catch'em

			//first let's add a fake appendChild method for Image element for browsers that have a problem with this
			//because editable plugin calls appendChild, and it causes errors on IE at unpredicted points
			try {
				document.createElement('IMG').appendChild(document.createElement('B'));
			} catch (e) {
				Image.prototype.appendChild = function (el) {}
			}

			var last_gritter
			$('#avatar').editable({
				type: 'image',
				name: 'avatar',
				value: null,
				//onblur: 'ignore',  //don't reset or hide editable onblur?!
				image: {
					//specify ace file input plugin's options here
					btn_choose: '选择图片',
					droppable: true,
					maxSize: 1100000, //~100Kb

					//and a few extra ones here
					name: 'avatar', //put the field name here as well, will be used inside the custom plugin
					on_error: function (error_type) { //on_error function will be called when the selected file has a problem
						if (last_gritter) $.gritter.remove(last_gritter);
						if (error_type == 1) { //file format error
							last_gritter = $.gritter.add({
								title: '所选文件不是图片!',
								text: '请选择 jpg|gif|png image!',
								class_name: 'gritter-error gritter-center'
							});
						} else if (error_type == 2) { //file size rror
							last_gritter = $.gritter.add({
								title: '文件太大!',
								text: '文件大小不超过 1M!',
								class_name: 'gritter-error gritter-center'
							});
						} else { //other error
						}
					},
					on_success: function () {
						$.gritter.removeAll();
					}
				},
				url: function (params) {
					// ***UPDATE AVATAR HERE*** //
					//for a working upload example you can replace the contents of this function with 
					//examples/profile-avatar-update.js

					var deferred = new $.Deferred

					var value = $('#avatar').next().find('input[type=hidden]:eq(0)').val();
					if (!value || value.length == 0) {
						deferred.resolve();
						return deferred.promise();
					}


					//dummy upload
					setTimeout(function () {
						if ("FileReader" in window) {
							//for browsers that have a thumbnail of selected image
							var thumb = $('#avatar').next().find('img').data('thumb');
							if (thumb) $('#avatar').get(0).src = thumb;
						}

						deferred.resolve({
							'status': 'OK'
						});

						if (last_gritter) $.gritter.remove(last_gritter);
						last_gritter = $.gritter.add({
							title: '上传成功!',
							text: '上传成功.',
							class_name: 'gritter-info gritter-center'
						});

					}, parseInt(Math.random() * 800 + 800))

					return deferred.promise();

					// ***END OF UPDATE AVATAR HERE*** //
				},

				success: function (response, newValue) {}
			})
		} catch (e) {}
	</script>

</body>

</html>